﻿CREATE TABLE [dbo].[t_LoanInfo] (
    [LoanID]                 INT             NOT NULL,
    [DownPayment]            NUMERIC (9, 2)  NULL,
    [LoanAmount]             NUMERIC (9, 2)  NULL,
    [PaymentsPerMonth]       TINYINT         NULL,
    [APROverride]            NUMERIC (18, 2) NULL,
    [DealerFee]              NUMERIC (9, 2)  NULL,
    [TaxableFees]            NUMERIC (9, 2)  NULL,
    [GAP]                    NUMERIC (5, 2)  NULL,
    [ServiceContract]        NUMERIC (6, 2)  NULL,
    [TradeIn]                NUMERIC (9, 2)  NULL,
    [AdvancePercent]         TINYINT         NULL,
    [AdvancePercentOverride] TINYINT         NULL,
    [ProcessingFee]          NUMERIC (5, 2)  NOT NULL,
    [UnderwritingFee]        INT             NULL,
    [OriginationFee]         NUMERIC (4, 2)  NULL,
    [DocPrepFee]             TINYINT         NULL,
    [TaxServiceFee]          INT             NULL,
    [PPP]                    INT             NOT NULL,
    [SalesTaxPercent]        NUMERIC (7, 7)  NULL,
    [SalesTaxAmount]         NUMERIC (7, 2)  NULL,
    [UnPaidBalanceWithTax]   NUMERIC (9, 2)  NULL,
    [TagFee]                 NUMERIC (9, 2)  NULL,
    [TrackerFee]             TINYINT         NULL,
    [ContractDate]           SMALLDATETIME   NULL,
    [FirstPaymentDate]       SMALLDATETIME   NULL,
    [Declined]               BIT             NOT NULL,
    [AddOnRateOverride]      NUMERIC (4, 2)  NULL,
    [PaymentOverride]        NUMERIC (6, 2)  NULL,
    [DiscountPercent]        NUMERIC (4, 2)  NULL,
    [OtherFees]              NUMERIC (18, 2) NULL,
    [IsRule78]               BIT             NOT NULL,
    [InterestType]           TINYINT         NOT NULL,
    [PaymentTypeID]          TINYINT         NOT NULL,
    [PaymentsPerYear]        TINYINT         NULL,
    [NumberOfPayments]       SMALLINT        NULL,
    [DayCountConventionID]   TINYINT         NOT NULL,
    [PrincipalBalance]       MONEY           NULL
);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = NULL, @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N't_LoanInfo', @level2type = N'COLUMN', @level2name = N'UnderwritingFee';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'In Percent', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N't_LoanInfo', @level2type = N'COLUMN', @level2name = N'OriginationFee';

